package com.platform.server.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.platform.server.dao.IdentityDao;
import com.platform.server.service.IdentityService;

@Service
public class IdentityServiceImpl implements IdentityService {

	@Autowired
	private IdentityDao identityDao;
	
	/**
	 * 身份审核列表
	 */
	@Override
	public List<Map<String, Object>> selectIdentityList(String userid,String username,String startTime,String endTime,String status,String mobile,String addres) {
		Map<String,Object> map = new HashMap<>();
		map.put("userid", userid);
		map.put("username", username);
		map.put("startTime", startTime);
		map.put("endTime", endTime);
		map.put("status", status);
		map.put("mobile", mobile);
		map.put("address", addres);
		return identityDao.selectIdentityList(map);
	}

	/**
	 * 修改身份认证状态和脸书状态
	 */
	@Override
	public int updateIdentityStatus(String status,String name,String userid) {
		int flag = identityDao.updateIdentityStatus(status, name,userid);
		Map<String,Object> map = new HashMap<>();
		map.put("status", status);
		map.put("userid", Integer.parseInt(userid));
		return identityDao.updateFaceStatus(map);
	}
	

}
